//
//  Story.h
//  iPing
//
//  Created by Thomas on 8/4/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SGStoryList.h"
#import "TCSGgetSOLstory.h"
/*typedef enum {
	kSCHostSOL = 0,
	kSCHostLIT = 1,
} HostType;*/
	
@interface StoryController : NSWindowController {
	IBOutlet NSTextField	*saveField;
    IBOutlet NSTextField	*idField;
	IBOutlet NSTextField	*labelField;
	IBOutlet NSTextField	*compileField;
	IBOutlet NSButton		*getButton;
    IBOutlet NSButton		*saveButton;
	IBOutlet NSButton		*moreInfoButton;
	IBOutlet NSButton		*shortTOC;
	IBOutlet NSButton		*longTOC;
	IBOutlet NSButton		*removeButton;
	IBOutlet NSButton		*compileButton;
	IBOutlet NSButton		*upButton;
	IBOutlet NSButton		*downButton;
	IBOutlet NSPopUpButton	*hostButton;
	IBOutlet NSTableView	*tableView;
	IBOutlet NSImageView	*imageWell;
	/*IBOutlet NSToolbarItem	*addButtonToolbar;
	IBOutlet NSToolbarItem	*minusButtonToolbar;
	IBOutlet NSToolbarItem	*saveFolderToolbar;*/
	StoryList				*theStoryList;
	BOOL					running;
	int						li;
	NSManagedObjectContext *managedObjectContext;
}
- (IBAction)addToLibrary:(id)pId;
- (IBAction)doOpenSaveFolder:(id)pId;
- (IBAction)doGet:(id)pId;
- (IBAction)doAddRandom:(id)pId;
- (IBAction)removeStoryFromTable:(id)pId;
- (IBAction)moveUpInTable:(id)pId;
- (IBAction)moveDownInTable:(id)pId;
- (IBAction)printToLog:(id)pId;
- (IBAction)changeHost:(id)pId;
- (NSString *)getSOLMultipleStory:(NSString *)storyID;
- (NSString *)getSOLChapter:(NSString *)chapterID fromStory:(NSString *)storyID type:(int)type chapterNumber:(int)number;
- (NSDictionary *)getSOLMoreInfoForID:(NSString *)storyID;
- (NSString *)combineAll;
//- (void)getStory:(NSString *)storyID;
- (void)getSOLStory:(NSString *)storyID;
- (BOOL)addStory:(int)row;
@end
